package com.study.java8;

import java.util.LinkedList;

public class Main {
    public static void main(String[] args)  {

        Integer[] a = { 15, 20, 30, 40, 55, 60, 75, 80 }, b = { 15, 20, 40, 80,-5 };


        LinkedList<Integer> list = new LinkedList<Integer>();
        for (Integer str : a) {
            if(!list.contains(str)) {
                list.add(str);
            }
        }
        for (Integer str : b) {
            if (list.contains(str)) {
                list.remove(str);
            }else{
                list.add(str);
            }
        }
        //差集为
        System.out.println(list);
    }
}